#!/usr/bin/python
import os
template = open('template.html').read()

for i in os.listdir('.'):
    if i.endswith('.txt'):
        filename = i[:-4]
        temp_txt = open(i).read()
        filetxt = template.replace('[[[InsertItems]]]', temp_txt)
        f = open('../help/%s.html' % filename, 'w'); f.write(filetxt); f.close()
